﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using FileSystem.Models;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;

namespace FileSystem.ViewModels {
    /// <summary>
    /// 添加用户页ViewModel
    /// </summary>
    public class AddUserPageViewModel : ViewModelBase {
        // ******** 构造函数

        /// <summary>
        /// 添加用户页ViewModel
        /// </summary>
        public AddUserPageViewModel() { }

        // ******** 绑定属性

        /// <summary>
        /// 用户
        /// </summary>
        public User User {
            get => _user;
            set => Set(nameof(User), ref _user, value);
        }

        /// <summary>
        /// 用户
        /// </summary>
        private User _user;


        // ******** 绑定命令
        /// <summary>
        /// 添加命令
        /// </summary>
        private RelayCommand _addCommand;

        /// <summary>
        /// 添加命令
        /// </summary>
        public RelayCommand AddCommand =>
            _addCommand ?? (_addCommand = new RelayCommand(async () => await AddCommandFunction()));

        public async Task AddCommandFunction() {
            throw new NotImplementedException();
        }

        // ******** 公开变量

        // ******** 私有变量
    }
}